{% extends "layouts/baseview.html" %}
{% load i18n %}
{% load short_uri %}

{%block title%}{{project.name}} - issues{%endblock%}

{% block stylesheet %}
	<link rel="stylesheet" href="/css/code-min.css" />
{% endblock %}

{%block ready_js%}

$('#btn-search').click(function () {
   $('#search-form #q').val($('#key-text').val());
   $('#search-form').submit();
});

$(".btn_del_issue").click(function (e) {
   var issue_id = $(this).attr('data-id');
   var row = $('.issue-row-'+issue_id);
   sure(e, '{%trans "Are you sure delete this issue?"%}', '{%trans "Yes"%}', '{%trans "No"%}', function() {
       q_get("issue/del", {'issue_id':issue_id}, function (result) {
           row.remove();           
       }, function() {
           show_info('{%trans "can not remove issue!"%}');
        });
   });	
});

{%endblock%}




{%block body-menu%}
	<div class="d-p-project-content d-p-project-faqs">
	
	    <ul class="d-p-project-faqstabs">

			 <li><a href="{{project|url}}issues/" {%if currentMenu == 'all'%}class="all-current" {%endif%}class="p-p-project-btn all" >{%trans "all"%}</a></li>
			 <li><a href="{{project|url}}issues/opened" {%if currentMenu == 'opened'%}class="tosolve-current" {%endif%}class="tosolve" >{%trans "opened"%}</a></li>
			 <li><a href="{{project|url}}issues/closed" {%if currentMenu == 'closed'%}class="solve-current" {%endif%}class="solve" >{%trans "closed"%}</a></li>   

	    </ul>
		<a href="{{project|url}}issue/new/" class="p-p-project-btn toquiz">{%trans "question"%}</a>
		




{%endblock%}

{%block main-block%}

	<div class="d-p-project-faqscontent">
	{%for issue in page.object_list%}
        <table>
               <tbody>
                   <tr>
                       <td>
                       {% if issue.status == 1 %}
                           <a class="d-p-faqsname faqs-solve" href="{{project|url}}issue/{{issue.id}}/">#{{issue.id}} {{issue.title}}</a>
                       {% else%}
                       	   <a class="d-p-faqsname faqs-nosolve" href="{{project|url}}issue/{{issue.id}}/">#{{issue.id}} {{issue.title}}</a>
                       {% endif %}
                           <p class="d-p-faqstintro">由<a href="{{issue.creator|url}}" class="d-p-faqser">{{issue.creator}}</a>表于&nbsp;&nbsp;{{issue.ctime|difftime}}&nbsp;&nbsp;|&nbsp;&nbsp;回复（{{issue.comments_count}}）</p>
                       </td>
                   </tr>

              </tbody>
         </table>

	{%endfor%}
 {% include "layouts/page-nav.html" %}
	</div>
{%endblock%}
